/*
Description: Script to insert into the database the whole list of Categories.
Creation date: 01/07/2011
History: <who>,<why>,<when>
*/
BEGIN TRAN

BEGIN TRY
		INSERT INTO [Categories]([CategoryName],[CategoryGrossSalary])
		VALUES ('Maestranza y servicios',230)
		INSERT INTO [Categories]([CategoryName],[CategoryGrossSalary])
		VALUES ('Administrativos',340)
		INSERT INTO [Categories]([CategoryName],[CategoryGrossSalary])
		VALUES ('Auxiliar',54)
		INSERT INTO [Categories]([CategoryName],[CategoryGrossSalary])
		VALUES ('Auxiliar especializado',345)
		INSERT INTO [Categories]([CategoryName],[CategoryGrossSalary])
		VALUES ('Ventas',345)
END TRY
BEGIN CATCH
	SELECT 
		ERROR_NUMBER() AS ErrorNumber
		,ERROR_MESSAGE() AS ErrorMessage;
    IF @@TRANCOUNT > 0
        ROLLBACK TRANSACTION;
END CATCH;

IF @@TRANCOUNT > 0
    COMMIT TRANSACTION;
GO